package com.kingcore.commerce.base.dao;

import java.util.List;
import java.util.Map;

import com.kingcore.framework.bean.Pagination;

/**
 * <br> 
 * <strong>WZW：一套同时可用KingCoreDao、Hibernate等实现的标准Dao接口。 Create on : 2011-12-31<br></strong>
 * <p>
 * <strong>Copyright (C) KingCore Software Co.,Ltd.<br></strong>
 * <p>
 * @author wuzeven@163.com<br>
 * @version <strong>e-Commerce v1.0.0</strong><br>
 */
public interface CommerceDao<T, PK extends java.io.Serializable> {
 
	T insert(T t, Map<String,Object> param) throws Exception;

	T delete(PK modelPK, Map<String,Object> param) throws Exception;
	
	T update(T t, Map<String,Object> param) throws Exception;
	
	T selectOne(PK modelPK, Map<String,Object> param) throws Exception; //load
	
	List<T> selectList(T t, Map<String,Object> param) throws Exception;   //findAll
 
	Pagination selectPage(T t, int pageNo, int pageSize, Map<String,Object> param) throws Exception;
	//int selectPagedCount(T model) throws Exception;

}
